void autoled()
{
    if (ledcur1 < ledset1)
        ledcur1++;
    else if (ledcur1 > ledset1)
    {
        ledcur1--;
    }
    ledWrite(4, ledcur1);
    
    if (ledcur2 < ledset2)
        ledcur2++;
    else if (ledcur2 > ledset2)
    {
        ledcur2--;
    }
    ledWrite(5, ledcur2);
}
void ledWrite(int pin, uint32_t val)
{
  if (val > 255)
        val = 255;
  else if (val < 0)
        val = 0;
  analogWrite(pin, val*val);
}
